//as 类型断言 用于指定一个值的类型
function getCacheData(key: string): any {
    return (window as any).cache[key];
}
interface Cat {
    name:string;
    run():void;
}
const tom = getCacheData("tom") as Cat;
//交叉类型
